<div class="bjui-pageHeader">
    <div class="pull-right">
        <button class="btn-default" data-icon="plus" title="增加活动" data-toggle="tooltip" data-placement="left" onclick="createDialog('{:U("Forms/orderprom")}', '增加活动', 'orderprom', {width:700, height:500})" ></button>
        <button class="btn-default" data-icon="refresh" onclick="$.CurrentNavtab.navtab('refresh')"></button>
    </div>
    <form id="pagerForm" data-toggle="ajaxsearch" data-loadingmask="true" action="{:U('orderpromo')}" method="post">
        <input type="hidden" name="pageSize" value="{:I('param.pageSize')}" />
        <input type="hidden" name="pageCurrent" value="{:I('param.pageCurrent')}" />
        <input type="hidden" name="orderField" value="{:I('param.orderField')}" />
        <input type="hidden" name="orderDirection" value="{:I('param.orderDirection')}" />
        <div class="bjui-searchBar">
           <label>活动名称:</label>
            <input type="text" name="name" value="{:I('name')}" />
            <label>时间区间:</label>
            <input type="text" name="start_time" value="{:I('start_time')}" class="dateStart"  data-toggle="datepicker" style="width: 150px;" />
            -
            <input type="text" name="end_time" value="{:I('end_time')}" class="dateEnd" data-toggle="datepicker"  style="width: 150px;" />
            <button type="submit" class="btn-default" data-icon="search">查询</button>
            <a class="btn btn-orange" href="javascript:;" data-toggle="reloadsearch" data-clear-query="true" data-icon="undo">清空查询 </a>
        </div>
    </form>
</div>
<div class="bjui-pageContent tableContent">
    <table class="table table-bordered table-hover table-striped table-top" data-selected-multi="false">
        <thead>
        <tr>
            <th>活动名称</th>
            <th>活动方式</th>
            <th>适用范围</th>
            <th>开始时间</th>
            <th>结束时间</th>
            <th>状态</th>
            <th width="100">操作</th>
        </tr>
        </thead>
        <tbody>
        <volist name="list" id="vo">
        <tr>
            <td>{$vo.name}</td>
            <td>{$vo.typename}</td>
            <td>{$vo.groupname}</td>
            <td>{$vo.start_time}</td>
            <td>{$vo.end_time}</td>
            <if condition="$vo.ck eq '2' and $vo.status eq '0'">
            <td><a href="{:U('Forms/update_prom_status',array('id'=>$vo['id']))}" data-type="get" data-toggle="doajax" data-confirm-msg="要暂停这个活动???">进行中</a></td>
            <elseif condition="$vo.ck eq '0'"/>
            <td>未开始</td>
            <elseif condition="$vo.ck eq '1'"/>
            <td>已结束</td>
            <elseif condition="$vo.ck eq '2' and $vo.status eq '1'"/>
            <td><a href="{:U('Forms/update_prom_status',array('id'=>$vo['id']))}" data-type="get" data-toggle="doajax" data-confirm-msg="要启用这个活动???">已关闭</a></td>
            </if>
            <td>
                <button type="button" class="btn-green" onclick="createDialog('{:U("Forms/orderprom",array("id"=>$vo["id"]))}', '修改活动', 'orderprom', {width:700, height:500})">改</button>
                <a href="{:U('Forms/del_prom',array('id'=>$vo['id']))}" data-type='get' class="btn btn-red" data-toggle="doajax" data-confirm-msg="" >删</a>
            </td>
        </tr>
        </volist>
        <!-- <tr>
            <td>订单满300元,立减50元</td>
            <td>满额优惠金额</td>
            <td>注册会员</td>
            <td>2016-11-11 12:00:00</td>
            <td>2016-12-12 12:00:00</td>
            <td><a href="{:U('Index/save')}" data-toggle="doajax" data-confirm-msg="要开始这个活动?">暂停中</a></td>
            <td>
                <button type="button" class="btn-green" onclick="createDialog('{:U("Forms/orderprom")}', '修改活动', 'orderprom', {width:700, height:500})">改</button>
                <a href="{:U('Index/save')}" class="btn btn-red" data-toggle="doajax" data-confirm-msg="" >删</a>
            </td>
        </tr>
        <tr>
            <td>订单满300元,立减50元</td>
            <td>满额优惠金额</td>
            <td>注册会员</td>
            <td>2016-11-11 12:00:00</td>
            <td>2016-12-12 12:00:00</td>
            <td>已结束</td>
            <td>
                <button type="button" class="btn-green" onclick="createDialog('{:U("Forms/orderprom")}', '修改活动', 'orderprom', {width:700, height:500})">改</button>
                <a href="{:U('Index/save')}" class="btn btn-red" data-toggle="doajax" data-confirm-msg="" >删</a>
            </td>
        </tr>
        <tr>
            <td>订单满300元,立减50元</td>
            <td>满额优惠金额</td>
            <td>注册会员</td>
            <td>2016-11-11 12:00:00</td>
            <td>2016-12-12 12:00:00</td>
            <td>未开始</td>
            <td>
                <button type="button" class="btn-green" onclick="createDialog('{:U("Forms/orderprom")}', '修改活动', 'orderprom', {width:700, height:500})">改</button>
                <a href="{:U('Index/save')}" class="btn btn-red" data-toggle="doajax" data-confirm-msg="" >删</a>
            </td>
        </tr> -->
        </tbody>
    </table>
</div>
<include file="Common/footer" ftype="page" />